<?php
// step1:connect to databaase
mysql_connect("localhost","root","");
mysql_select_db("test_zf2");

// step 2: get data from android device and insert to table
$name = $_POST['fullname'];
$addr = $_POST['addr'];
$age  = $_POST['age'];
$strSQL = sprintf("INSERT INTO students VALUES(0,'%s','%s',%d)",$name,$addr,$age);
mysql_query($strSQL);
// step3: close connection
mysql_close();